<span style="font-size:12px;"><span style="font-size:14px;">
<%@ page language="java" import="java.sql.*,java.io.*,java.util.*"%>
<%@ page import="java.lang.String"%>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page import="java.sql.Statement" %>
<%@ page import="java.sql.ResultSet" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <style type="text/css">
table {
    border: 2px #CCCCCC solid;
    width: 360px;
}

td,th {
    height: 30px;
    border: #CCCCCC 1px solid;
}
</style>
</head>
<body background="images/ad4.jpg" style="background-repeat: no-repeat;background-color: #adb5bd" >
<div style="padding-left: 600px">
        <div id="menu" style="width: 100%;height:40px;padding-left: 10px">

            <form>

                <input type="text" name="order" placeholder ="请输入物品名">

                <div><a href="search.jsp"><input type="submit" value="查询"></a></div>

            </form>

        </div>
    <h1>所有物品信息</h1>
</div>
<%
    //注册数据库驱动
    Class.forName("com.mysql.jdbc.Driver");
//获取数据库连接
    Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/lost", "root", "123456");
//创建statement
    Statement stmt = conn.createStatement();
//执行查询
    String sql = "select * from good";
    ResultSet resultSet = stmt.executeQuery(sql);
%>
<div>
<table align="center">
    <tr>
        <th>
            <%
                out.print("goodid");
            %>
        </th>
        <th>
            <%
                out.print("goodname");
            %>
        </th>
        <th>
            <%
                out.print("goodtime");
            %>
        </th>
        <th>
            <%
                out.print("goodexplain");
            %>
        </th>
        <th>
            <%
                out.print("goodpicture");
            %>
        </th>
        <th>
            <%
                out.print("goodstate");
            %>
        </th>
        <th>
            <%
                out.print("fabucontact");
            %>
        </th>
        <th>
            <%
                out.print("fabutime");
            %>
        </th>
        <th>
            <%
                out.print("          ");
            %>
        </th>
    </tr>

    <%
        while (resultSet.next()) {
    %>
    <tr>
        <td>
            <%
                out.print(resultSet.getString(1));
            %>
        </td>
        <td>
            <%
                out.print(resultSet.getString(2));
            %>
        </td>
        <td>
            <%
                out.print(resultSet.getString(3));
            %>
        </td>
        <td>
            <%
                out.print(resultSet.getString(4));
            %>
        </td>
        <td>
            <%
                out.print(resultSet.getString(5));
            %>
        </td>
        <td>
            <%
                out.print(resultSet.getString(6));
            %>
        </td>
        <td>
            <%
                out.print(resultSet.getString(7));
            %>
        </td>
        <td>
            <%
                out.print(resultSet.getString(8));
            %>
        </td>
        <td>
            <div><a href="apply.jsp">申领</a> </div>
        </td>
    </tr>
    <%
        }
    %>
</table>
    <div align="center">
        <br> <br> <br>
        <%
            out.print("");
        %>
    </div>
    <%
        resultSet.close();
        stmt.close();
        conn.close();
    %>
    </table>
</div>
</body>
</html></span><span style="font-size:24px;color: rgb(255, 0, 0);">
</span></span>